import axios from "axios";

//一次封装：一次封装就是针对axios对象本身的封装    
let newAxios = axios.create({
    baseURL: '/api'
})

//传递数据时以键值对的方式来传递
newAxios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';

//将newAxios对象对外暴露出去    
export default newAxios